package lsl.leetCode.year2023.test0124;

import java.util.HashSet;

public class test217 {
    public static void main(String[] args) {
        int[] nums = {1, 2, 2, 3, 3,1,4};
        System.out.println(containsDuplicate(nums));
    }
    public static String  containsDuplicate(int[] nums) {
        HashSet<Object> set = new HashSet<>();
        for (int num: nums){
            if(!set.add(num)){
                return "true";
            }
        }
        return "false";
    }

}
